package cn.sc.summer.token.po;

import lombok.Data;
import org.springframework.security.core.GrantedAuthority;

import java.io.Serializable;

/**
 * 类名：自定义权限信息
 *
 * @author a-xin
 * @date 2024/6/12 11:30
 */
@Data
public class AuthorityX implements Serializable, GrantedAuthority {

    private static final long serialVersionUID = -3418785218859793958L;

    /**
     * 权限信息
     */
    private String authority;

    /**
     * 获取默认权限信息
     *
     * @return 权限信息
     */
    public static AuthorityX getDefault() {
        AuthorityX authorityX = new AuthorityX();
        authorityX.setAuthority("default");
        return authorityX;
    }

}
